From: Ray Strode Date: Wed, 20 Feb 2013 18:15:51 +0000 (-0500) Subject: modalDialog: emit 'closed' signal when dialog is closed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4685 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=677cdfd6c8f1dadece4a2c643bf1a59cd1e71de8;p=gnome-shell.git modalDialog: emit 'closed' signal when dialog is closed Opening and closing a modal dialog is not instant. There is a transition animation involved. When the dialog is finished opening, it currently emits the "opened" signal. When it's finished closing, however, it doesn't emit a "closed" signal. This means, there's not a good way to know when the dialog finishes closing. This commit adds the "closed" signal. https://bugzilla.gnome.org/show_bug.cgi?id=694296 --- diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 7c99598ca..4649d6d50 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -265,6 +265,7 @@ const ModalDialog = new Lang.Class({ function() { this.state = State.CLOSED; this._group.hide(); + this.emit('closed'); }) }); },